package com.bdqn.controller;

import com.bdqn.pojo.SysRole;
import com.bdqn.service.SysRoleService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;
@Controller
@RequestMapping("/role")
public class SysRoleController {
    private Logger logger = Logger.getLogger(SupplierController.class);
    @Resource
    private SysRoleService sysRoleService;
    @RequestMapping("/list")
    public String getRoleList(Model model){
        logger.info("进入角色查询方法");
        List<SysRole> roleList = null;
        roleList = sysRoleService.getRole();
        model.addAttribute("roleList",roleList);
        return "sysRole/list";
    }
}
